package org.xshop.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import top.ibase4j.core.util.InstanceUtil;

@Component
public class SysService {
    @Autowired
    private ISysDicService sysDicService;

    public List<?> getDics(String type, String parentType, String parentCode) {
        Map<String, Object> map = InstanceUtil.newHashMap();
        map.put("type", type);
        map.put("parentType", parentType);
        map.put("parentCode", parentCode);
        map.put("orderBy", "type_,sort_no");
        map.put("sortAsc", "asc");
        List<?> list = sysDicService.queryList(map);
        return list;
    }

    public Map<?, ?> getDics(String type) {
        Map<?, ?> map = sysDicService.queryDicByType(type);
        return map;
    }
}
